<template>
	<view class="">
		<view class="min-con main-wrap" :class="{show: loaded}">
			<view class="column center" style="height: 300upx;">
				<image :src="dataInfo.icon" mode="" class="logo"></image>
				<view class="title">{{ dataInfo.name }}</view>
			</view>
			<view class="orderInfoCon">
				<view class="row between itemCon">
					<view class="itemTitle">软件版权</view>
					<view class="">
						<text class="itemNumber">{{ dataInfo.copyright }}</text>
					</view>
				</view>
				<view class="row between itemCon">
					<view class="itemTitle">客服微信</view>
					<view class="">
						<text class="itemNumber">{{ dataInfo.weChat }}</text>
						<text class="itemCopy" @tap="copy(dataInfo.weChat)">复制</text>
					</view>
				</view>
				<view class="row between itemCon">
					<view class="itemTitle">企业网址</view>
					<view class="">
						<text class="itemNumber">{{ dataInfo.url }}</text>
					</view>
				</view>
			</view>
		</view>
		<mix-loading v-if="isLoading"></mix-loading>
	</view>
</template>

<script>
export default {
	data() {
		return {
			dataInfo: {}
		};
	},
	onLoad() {
		this.loadData();
	},
	methods: {
		copy(number) {
			uni.setClipboardData({
				data: number,
				success: function() {
					console.log("success");
				}
			});
		},
		async loadData() {
			const res = await this.$request("content/about-us", {}, {showLoading: true});
			if (res.result == 0) {
				this.dataInfo = res.data;
			} else {
				this.$util.msg(res.resultNote);
			}
		}
	}
};
</script>
<style>
page {
	background: #ffffff;
}
</style>

<style scoped>
.title {
	margin-top: 30upx;
	font-size: 34upx;
	font-family: PingFang SC;
	font-weight: bold;
	color: #000000;
}
.orderInfoCon {
	width: 709upx;
	background: #f3f5f9;
	border-radius: 20upx;
	padding: 30upx;
	margin: 40upx auto;
}
.itemCon {
	padding: 20upx 0;
}
.itemTitle {
	color: #596d8d;
	font-size: 26upx;
}
.itemNumber {
	color: #596d8d;
	font-size: 24upx;
}
.itemCopy::before {
	content: "I";
	font-size: 24upx;
	color: #596d8d;
	width: 30upx;
	display: inline-block;
	text-align: center;
}
.itemCopy {
	color: #000000;
	font-size: 24upx;
}
.logo {
	width: 165upx;
	height: 165upx;
	border-radius: 50%;
}
</style>
